CFLAGS=-I../core -I../shared -pg -L../shared  --std=c99

all: nbdf_test dsim_tester test_btree test_evtracker

test_evtracker: test_evtracker.c ../dvn-core/evtracker.o 
	gcc $(CFLAGS) -o test_evtracker test_evtracker.c ../dvn-core/evtracker.o ../dvn-core/heap.o ../dvn-shared/log.o

nbdf_test: nbdf_test.o ../dvn-shared/libdvn-shared.la
	libtool gcc $(CFLAGS) nbdf_test.o ../dvn-shared/libdvn-shared.la -o nbdf_test

nbdf_test.o: nbdf_test.c 
	gcc $(CFLAGS) -c nbdf_test.c

#test_pipecloud: test_pipecloud.o pipecloud.o
#	libtool gcc $(CFLAGS) ../dvn-shared/libdvn-shared.la test_pipecloud.o -o test_pipecloud
test_pipecloud: test_pipecloud.c pipecloud.c list.c ../shared/pipecloud.h ../shared/list.h utility.c ../shared/utility.h
	gcc $(CFLAGS) -o test_pipecloud test_pipecloud.c pipecloud.c list.c utility.c

test_multiso: test_multiso_lib.so test_multiso.o
	gcc -o test_multiso test_multiso.o -ldl

test_multiso.o: test_multiso.c
	gcc -c test_multiso.c

test_multiso_lib.so: test_multiso_lib.o
	gcc -shared -Wl,--export-dynamic -Wl,-soname,test_multiso_lib.so -o test_multiso_lib.so test_multiso_lib.o

test_multiso_lib.o: test_multiso_lib.c
	gcc -c test_multiso_lib.c

clean:
	rm *.o *.so test_multiso
